﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace SQ816FWUpdater
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private static string _FlashToolName = null;
        public static string FlashToolName
        {
            get
            {
                if (_FlashToolName == null)
                    _FlashToolName = ConfigurationManager.AppSettings.Get("FlashToolName");
                return _FlashToolName;
            }
        }
        private static string _ExtraArgument = null;
        public static string ExtraArgument
        {
            get
            {
                if (_ExtraArgument == null)
                {
                    _ExtraArgument = ConfigurationManager.AppSettings.Get("ExtraArgument") ?? "";
                }
                return _ExtraArgument;
            }
        }
        public static string vid { get { return ConfigurationManager.AppSettings.Get("vid"); } }
        public static string pid { get { return ConfigurationManager.AppSettings.Get("pid"); } }
        public static string Arg { get; private set; }
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            // If a single command line argument exists, 
            // expose it for the MainWindow class
            Arg = (e.Args.Length == 1) ? e.Args[0] : null;
        }
    }
}
